import strNotificationItemHtml from "./NotificationItem.html";
import { DomUtils } from "../../../utils/DomUtils";

export class NotificationItem {
  constructor(notification) {
    this.notification = notification;
  }

  render() {
    let strHtml = strNotificationItemHtml;
    strHtml = strHtml.replace("{{icon}}", this.notification.icon);
    strHtml = strHtml.replace("{{date}}", this.notification.date);
    strHtml = strHtml.replace("{{title}}", this.notification.title);
    strHtml = strHtml.replace("{{content}}", this.notification.content);
    return DomUtils.convertToDom(strHtml);
  }
}
